//
// Created by tang on 23-3-26.
//

#ifndef PIINFO_PANELS_HPP
#define PIINFO_PANELS_HPP

#define DECLARE_PANEL(name)              \
extern const char name ## _panel_name[]; \
extern bool name##_open;                 \
void name##_panel()

DECLARE_PANEL(log);
DECLARE_PANEL(plugin_list);
DECLARE_PANEL(plugin_content);
DECLARE_PANEL(ui_test);
DECLARE_PANEL(imgui_debug);

#undef DECLARE_PANEL
#define PANEL_IMPL(name, name_string, default_open)         \
const char name##_panel_name[] = name_string; \
bool name##_open = default_open; \
void name##_panel()

struct PanelInfo {
    const char *name;
    bool       *open;
    void      (*show)();
};

extern const PanelInfo panels[];
extern const u32       panel_count;

#endif  // PIINFO_PANELS_HPP
